import request from "@/utils/request";

export const CommonApi = {
  contextPath: '/equip', //按照实际应用修改成微服务的名�?//
  userInfo: async () => {
    return request({
      url: "/admin/user/info",
      method: 'GET',
    })
  },
  exportXls: (data) => { //导出//
    return request({
      url: CommonApi.contextPath + '/export/export-page',
      method: 'POST',
      data: data,
      responseType: 'blob'
    })
  },
  queryDictData: (code) => { //字典项
    return request({
      url: CommonApi.contextPath + '/t-en-interface-code/queryLeaf?code=' + code,
      method: 'POST',
      // data: code
    })
  },
  uploadImage: function (params) {
    return request({
      url: '/file/upload',
      method: 'post',
      headers: {'Content-Type': 'multipart/form-data'},
      data: params
    })
  },
  getKfByGldw: (code) => { //管理单位联动库房//
    return request({
      url: CommonApi.contextPath + '/en-wz-kfgl/dwbm/' + code,
      method: 'POST'
    })
  },
}

// export default CommonApi;
